Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.7 KiB

  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!-- simple xslt file: sce_inf.xsl -->
  3. <xsl:stylesheet
  4. version="1.0"
  5. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  6. xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  7. xmlns:ssr="http://microsoft.com/sce/ssr"
  8. >
  9. <!-- These are some XSLT extension functions -->
  10. <xsl:import href="../CommonLib/ExtFunctions.xsl"/>
  11. <xsl:output method="text" indent="no"/>
  12. <msxsl:script language="JScript" implements-prefix="ssr">
  13. <!-- do not analyze xml syntax -->
  14. <![CDATA[
  15. //
  16. // We need to use 2, 3, and 4 for automatic, manual, and disabled
  17. // startup mode inside INF template.
  18. //
  19. function GetStartupMode(svc)
  20. {
  21. var strMode = AttribValue(svc, "StartupMode").toUpperCase();
  22. if (strMode == "AUTOMATIC")
  23. return 2;
  24. else if (strMode == "MANUAL")
  25. return 3;
  26. else if (strMode == "DISABLED")
  27. return 4;
  28. else
  29. return 0;
  30. }
  31. ]]>
  32. </msxsl:script>
  33. <xsl:template match="/SSRSecurityPolicy/Services">
  34. [Unicode]
  35. Unicode=yes
  36. [Version]
  37. signature="$CHICAGO$"
  38. Revision=1
  39. ' This section will setup the services according to the settings of the
  40. ' security policy. 2 = automatic, 3 = manual, and 4 = disabled
  41. [Service General Setting]
  42. <xsl:for-each select="Service">
  43. <xsl:variable name="svc" select="."/>
  44. <xsl:variable name="startupmode" select="ssr:GetStartupMode($svc)"/>
  45. <xsl:if test="$startupmode != 0">
  46. <xsl:value-of select="ssr:AttribValue($svc, 'Name')"/>,<xsl:value-of select="$startupmode"/>,""
  47. </xsl:if>
  48. </xsl:for-each>
  49. </xsl:template>
  50. </xsl:stylesheet>